<template>
	<view>
		<uni-nav-bar title="资料设置" :statusBar="true" :border="false" left-icon="back" :fixed="true"
			@clickLeft="$tab.back()">
		</uni-nav-bar>
		
		<view class="px-20 bg-FFF">
			<view class="mt-32 flex justify-around py-32" @click="delFriend">
				<view class="flex items-center">
					<image src="http://api.fceos.cn/qiliaoyun/profile/appImages/icon_shanchu@2x.png" class="image-40" mode=""></image>
					<view class="text-F40600 ml-16">
						删除联系人
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				blankSwitch:false,
				userId: null,
			};
		},
		onLoad(e) {
			this.userId = e.userId
		},
		methods:{
			delFriend() {
				this.$modal.confirm('确认删除好友和所有记录吗?').then(async con => {
					if (con) {
						const res = await this.$Api.index.delFriend(this.userId)
						uni.navigateBack({
							delta:2
						})
					}
				})
			},
		}
	}
</script>

<style lang="scss">
	/deep/ .u-switch__node {
		background-color: #e8e8e8 !important;
	}
</style>
